package com.sky.mapper.user;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sky.entity.Setmeal;
import com.sky.vo.DishItemVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserSetmealMapper extends BaseMapper<Setmeal> {
    //
    @Select("select sd.name as name, sd.copies as copies from sky_take_out.setmeal_dish sd left join sky_take_out.dish d on " +
            "sd.dish_id = d.id where sd.setmeal_id = #{setmealId} ")
    List<DishItemVO> getDishItemById(Long setmealId);
}
